<style>
body {
  font-family: arial;
}
.estimativa {
  border: solid 1px; 
  text-align: center; 
  font-size:.9em; 
  padding:8px;
}
.estimativa span{
  font-size:1.5em; 
}
.tabela {
  border-collapse: collapse;
  border: solid 1px;
  margin: 10px;
  page: auto;
  page-break-before: auto;
  page-break-after: auto;
}

.nome {
  padding:10px;
  font-size:1.2em;
  font-weight:bold;
}
.nome span {
  font-size:.7em;
  color: #999;
  font-weight:lighter;
}
.descricao {
  font-size: .9em;  
  color: #000;
  padding: 10px;
  border: solid 1px;
}
.field-name{
  padding: 5px;
}
.conteudo {
  color: #999;
  padding:10px;
}
.impresso {
  color: #999;
  text-align: right;
}
.nobreak {
  page-break-after: avoid;
  page-break-before: avoid;
  page-break-inside: avoid;
}
</style>
<?php foreach($tree as $node): ?>
<?php if($node->backlog): ?>

<div class='el'>
<table class='tabela' width=600>
  <tr class='nobreak'>
     <td class='nome'>
       <?php echo $node->name ?>
       <br/>
       <span>
         <?php foreach($node->getPath(true) as $parent): ?>
           >> <?php echo $parent[0] ?>
         <?php endforeach; ?>
       </span>
     </td>
     <td class='estimativa' width=50>
       estimativa:<br/>
       <span><?php echo $node['estimated'] ? number_format($node['estimated'],1) : '&nbsp;' ?></span>
     </td>
   </tr>
   <tr>
     <td colspan="2" class='conteudo'>
       <?php if($node->description): ?>
       <div class='field-name'>Task Description:</div>
       <div class='descricao'>
       <?php echo nl2br($node->description) ?>
       </div>
       <?php endif; ?>
       <?php if($node->how_to_show): ?>
       <div class='field-name'>How to Show:</div>
       <div class='descricao'>
       <?php echo nl2br($node->how_to_show) ?>
       </div>
       <?php endif; ?>
       <?php if($node->technical_aspects): ?>
       <div class='field-name'>Technical Aspects:</div>
       <div class='descricao'>
       <?php echo nl2br($node->technical_aspects) ?>
       </div>
       <?php endif; ?>
       <div class='impresso'>impresso: <?php echo date('m/d/Y'); ?></div>
     </td>
   </tr>
</table>
</div>

<?php endif; ?>
<?php endforeach; ?>